import React from 'react'
import { withRouter, RouteComponentProps } from 'react-router-dom'
import PageLoading from '../../components/page-loading'
import NavTabBar from '../../components/common/nav-tabbar'
import QaList from './qa-list'
import Search from './search'
import './index.less'

class Home extends React.Component<Props & RouteComponentProps, State> {
    constructor(props) {
        super(props)

        this.state = {
            loading: false,
            activityList: [],
        }
    }
    emptyOpt = {
        des: '暂无活动',
        btnText: '',
        btnLink: '/',
    }
    componentDidMount() {}

    render() {
        const { activityList, loading } = this.state

        return (
            <>
                <PageLoading
                    loading={loading}
                    empty={false}
                    emptyOpt={this.emptyOpt}
                    show={loading}
                >
                    <Search {...this.props} />
                    <QaList {...this.props} />
                </PageLoading>
                <NavTabBar active={0} />
            </>
        )
    }
}
export default withRouter(Home)
